{% extends "base-admin.html" %}
{% block title %}友情链接管理{% endblock %}
{% block main %}
    <h3>友情链接管理</h3>
    <hr>
    <div class="row">
    <table class="table table-hover">
     <thead>
        <tr>
            <th>网站名称</th>
            <th>网站链接</th>
            <th>功能</th>
        </tr>
     </thead>
     <tbody>
        {% for link in links %}
            <tr>
				<th><a href={{ link.url }} target="_blank">{{ link.site }}</a></th>
                <th><a href="{{ link.url }}" target="_blank">{{ link.url }}</a></th>
                <th><a href="{% url 'delete_link' link.id %}" class="btn btn-danger">删除</a></th>
            </tr>
        {% endfor %}
     </tbody>

    </table>

    </div>
    <hr>
	<a href="{% url 'create_link' %}" class="btn">添加链接</a>
{% endblock %}
